/**
 * @author baz
 */
package bot.weapon {
import flash.display.Sprite;

public class FireBall extends Sprite implements IFrameObject {
    private static const RADIUS:int = 6;
    private static const SPEED:int = 16;

    /**
     * Графика Fireball-а
     */
    private var shotView:ShotFireball;

    private var angle:Number;

    public function FireBall(data:FireBallVO) {
        this.angle = data.angle;

        shotView = new ShotFireball();
        addChild(shotView);

        this.x = data.startPoint.x;
        this.y = data.startPoint.y;
    }

    public function frameHandler():void {
        this.x -= SPEED * Math.cos(angle);
        this.y -= SPEED * Math.sin(angle);
    }
}
}
